<!--经营资质详情页面-->
<template>
  <div class="particulars">
    <HeaderIndex :isReturnText="false" :isClose="false" :isService="true" />
    <div class="content">
      <div class="content-title">{{ detailsPage.qualificationName }}</div>
      <div class="content-txt"
        >资质类别：<span>{{ detailsPage.qualificationType }}</span> | 强制适用：<span>{{
          detailsPage.mandatoryApplication
        }}</span></div
      >
      <div class="content-txt"
        >主管机关或机构：<span>{{ detailsPage.regulatoryAuthorities }}</span></div
      >
      <div class="content-txt"
        >法律法规或规范依据：
        <span class="txt-link" @click="documentPage(item.value)" v-for="(item, index) in legalRegulationsData" :key="index">
          {{item.name }}</span>
      </div>
      <div class="content-txt"
        >专业主题：<span>{{ detailsPage.professionalTheme }}</span></div
      >
      <div class="content-txt"
        >涉及职能部门：<span>{{ detailsPage.functionalDept }}</span></div
      >
      <div class="content-txt"
        >规范的事项或活动：<span>{{ detailsPage.normativeMatter }}</span></div
      >
    </div>
  </div>
</template>

<script>
import HeaderIndex from "components/header/index.vue";
import { getBusinessLicenseDetail, particulars } from "@/api";
export default {
  data() {
    return {
      legalRegulationsData: [], //法律法规或规范依据
      detailsPage: {}, //详情页面
    };
  },
  components: {
    HeaderIndex,
  },
  async created() {
    const getBusinessLicenseDetailData = await getBusinessLicenseDetail(this.$route.query.id);
    this.detailsPage = getBusinessLicenseDetailData.data.businessLicenseInfo;
    this.legalRegulationsData = getBusinessLicenseDetailData.data.legalPolicySimpleList;
  },
  methods: {
    documentPage(id) {
      this.$router.push({ name: "particulars", query: { id } });
    },
  },
};
</script>

<style scoped lang="less">
.particulars {
  height: 100%;
  display: flex;
  flex-direction: column;
  .content {
    .content-title {
      display: flex;
      justify-content: center;
      align-items: center;
      height: 90px;
      font-size: 40px;
    }
    .content-txt {
      padding: 0 30px 20px;
      font-size: 30px;
      color: #000000;
      span {
        color: #686868;
      }
      .txt-link {
        color: #007aff;
        margin-right: 10px;
      }
    }
  }
}
</style>
